package com.java.parallel.threadBand.minsheng;

import java.util.Scanner;

/**
 * @author guoyu
 * @date 2022/12/3
 * @Version 1.0
 * @Description TODO
 */
public class Main21 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = sc.nextInt();
        deal(n, k);
//        for (int i = 0; i < res.size(); i++) {
//            System.out.print(res.get(i));
//        }
    }

    private static void deal(int n, int k) {
//        int res[] = new int[n];
//        LinkedList<Integer> res = new LinkedList();

        int st = 1;
        int ed = n;
        int tar = n - k - 1;
        while (st <= tar) {
            System.out.println(st + " ");
            st++;
        }
        while (ed >= st) {
            System.out.println(ed + " ");
            ed--;
        }
    }
}
